<div>
    <div style="margin-bottom: 20px;">
        <span style="font-size: 30px">分布式平台框架日志分析</span>
        <span class="navbar-version" style="color:red">{{partition}}</span>
        <span class="navbar-version" ng-show="!winvisible" ng-click="win.open()">[选择分区]</span>
    </div>
    <div kendo-window="win" k-title="'选择分区'"
         k-width="740" k-height="220" k-visible="false"
         k-on-open="winvisible = true" k-on-close="winvisible = false">

        <div class="partition_box">
            <div  class="partition_section">
                <div class="partition_title">
                    <a href=""  ng-click="selectShow(0)">全部</a>
                </div>
                <div class="partition_content_w">
                </div>
            </div>
            <div  class="partition_section">
                <div ng-repeat="item in partitionSource">
                    <div class="partition_title">
                        <a href="">{{item.fname}}</a>
                    </div>
                    <div class="partition_content_w">
                        <div class="partition_link" ng-repeat="k in item.partition">
                            <a href="" ng-click="selectShow(k)">{{k.cname}}</a>
                        </div>
                    </div>
                    <br>
                </div>
                <br>
            </div>
        </div>
    </div>
</div>
<div class="query">查询条件</div>

<div class=" textboxes">
    <div class="form-inline group-margin">
        <div class="form-group">
            <div class="form-group">
                <label>日志类型:</label>
                <select kendo-drop-down-list
                        k-options="typeOptions"
                        k-data-text-field="'cname'"
                        k-data-value-field="'ename'"
                        ng-model="param.type" class="myinput"></select>
            </div>
            <label>日志级别:</label>
            <select kendo-drop-down-list ng-model="param.priority" class="myinput">
                <option value=""></option>
                <option value="3">INFO</option>
                <option value="4">WARN</option>
                <option value="5">ERROR</option>
                <option value="6">CRITICAL</option>
            </select>
        </div>
        <div class="form-group">
            <label>模糊匹配:</label>
            <input kendo-auto-complete ng-trim="true" ng-model="param.key" class="myinput"/>
        </div>
    </div>


    <div class="form-inline group-margin">
        <div class="form-group">
            <label>日志时间:</label>
            <select kendo-drop-down-list ng-model="param.queryType" ng-change="selectQuery()"
                    class="myinput">
                <option value="0">精确查找</option>
                <option value="1">快速查找</option>
            </select>
        </div>
        <div class="form-group" ng-if="isQuickQuery">
            <label>起始时间:</label>
            <input kendo-date-time-picker k-ng-model="param.startTime" k-format = "'yyyy-MM-dd HH:mm:ss'"/>
        </div>
        <div class="form-group" ng-if="!isQuickQuery">
            <label>起始时间:</label>
            <input type="number" kendo-auto-complete ng-model="param.dateValue"
                   style="width: 70px;"/>
            <select kendo-drop-down-list ng-model="param.dateType"  style="width: 135px;">
                <option value="second">秒钟之前</option>
                <option value="minute">分钟之前</option>
                <option value="hour">小时之前</option>
                <option value="day">天之前</option>
                <option value="week">周之前</option>
                <option value="month">月之前</option>
                <option value="year">年之前</option>
            </select>
        </div>
        <div class="form-group" ng-if="isQuickQuery">
            <label>结束时间:</label>
            <input kendo-date-time-picker k-ng-model="param.endTime" k-format = "'yyyy-MM-dd HH:mm:ss'"/>
        </div>
        <div class="form-group" ng-if="!isQuickQuery">
            <label>结束时间:</label>
            <input kendo-date-time-picker readonly="true" value="Now"/>
        </div>
    </div>
    <div class="form-inline group-margin">
        <div class="form-group">
            <label>关键字:</label>
            <input kendo-auto-complete ng-trim="true" ng-model="param.keys" style="width: 896px"/>
            <a href="http://190.2.253.23:8000/jiawenguang/IDKSearchDoc" target="_blank"><img src="content/images/help.png" style="width:20px"></a>
        </div>
        <kendo-button class="k-primary" ng-click="query()" style="float: right;">查询</kendo-button>
    </div>
</div>
<div class="table-responsive">
    <div class="result">结果集</div>

    <div kendo-grid="frameLogGrid"
         k-options="frameLogGridOptions"
         k-on-change="frameLogGridRowClick(data, dataItem, columns)"
         k-on-edit="frameLogGridRowEdit(kendoEvent)">
        <div k-detail-template>
            <ul class="list-group">
                <li class="list-group-item">logtime：{{dataItem.logtime}}</li>
                <li class="list-group-item">logmsg：{{dataItem.logmsg}}</li>
                <li class="list-group-item">key1：{{dataItem.key1}}</li>
                <li class="list-group-item">key2： {{dataItem.key2}}</li>
                <li class="list-group-item">key3：{{dataItem.key3}}</li>
                <li class="list-group-item">key4：{{dataItem.key4}}</li>
                <li class="list-group-item">key5：{{dataItem.key5}}</li>
                <li class="list-group-item">priority：{{dataItem.priority}}</li>
                <li class="list-group-item">category：{{dataItem.category}}</li>
                <li class="list-group-item">interval：{{dataItem.interval}}</li>
                <li class="list-group-item">pid：{{dataItem.pid}}</li>
                <li class="list-group-item">ip：{{dataItem.ip}}</li>
                <li class="list-group-item">mac： {{dataItem.mac}}</li>
                <li class="list-group-item">uid：{{dataItem.username}}</li>
                <li class="list-group-item">formname：{{dataItem.formname}}</li>
                <li class="list-group-item">svc：{{dataItem.svc}}</li>
                <li class="list-group-item">func： {{dataItem.func}}</li>
            </ul>
        </div>
    </div>
</div>
</div>
